home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 142 (1990-08-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 142 (1990-08-15)(Ossowski, Stefan)(DE)(PD).adf / Mostra / Mostra.tex < prev    next >
Text File  |  1990-05-15  |  21KB  |  428 lines

  1. \font\twelverm=cmr12
  2. \font\twelvett=cmtt12
  3. \twelverm
  4. \font\it=cmti12
  5. \font\bf=cmbx12
  6. \font\big=cmbx10 scaled\magstep5
  7. \font\bigss=cmssdc10 scaled\magstep5
  8. \font\twelvess=cmssdc10 scaled\magstephalf
  9. \def\Mostra{{\twelvess Mostra}}
  10. \centerline{\bigss Mostra}
  11. \vskip 1cm
  12. \centerline{\big A Universal IFF Viewer}
  13. \vskip 1cm
  14. \parindent=40pt
  15. \parskip=10pt plus 1pt minus 1pt
  16. \baselineskip=15pt
  17. \noindent There are many utilities for viewing IFF ILBM files, but none I'd seen
  18. until now met the goal of displaying every IFF picture; each had its
  19. idiosyncrasies.  If one viewer could display overscan pictures, then every
  20. picture with more than 640 pixels on a line would be shifted like there were 700
  21. pixels; some programs could only show a directory of pictures by forcing the
  22. user to enter all the filenames; some programs would crash with PAL pictures;
  23. others would do the same with pictures larger than any screen; it was rare to
  24. have an option to force a screen mode (for the tech-folks out there:  old IFF
  25. ILBM files don't have the CAMG chunk!); there were no comfortable file
  26. requesters for use when you didn't know the exact name of the file (who can
  27. remember GRABBiT file names?); pressing the right mouse button could cause a
  28. useless drag bar to corrupt the picture$\ldots$
  29.  
  30. If a program had one feature, it lacked another, so I decided to write a show
  31. utility.  I never would have succeeded without the best friend of an Amiga
  32. programmer:  the ARP library.  If I have been able to write \Mostra, it's only
  33. to ARP's credit.  Pattern matching, resource tracking, powerful resident
  34. functions$\ldots$ The only drawback is that you {\it must\/} have the
  35. arp.library (V39!) in your libs:  directory in order to run \Mostra.  Otherwise,
  36. a message will be displayed, and \Mostra\ will refuse to run.  \Mostra\ is also
  37. a pure program, i.e., it can be made resident.
  38.  
  39. Note that you can run \Mostra\ from Workbench:  called by itself it will pop the
  40. file requester and will show you pictures until you select {\twelvett CANCEL} or
  41. close the file requester window.  Otherwise, you can select multiple icons, or
  42. you can change the default tool of your pictures.  Note that if you do this with
  43. a CAT or a LIST you will have an automatic little slideshow.
  44.  
  45. \Mostra\ can process {\it any\/} IFF ILBM file (including Photon Paint files,
  46. excellence!  files etc.); this means not only IFF ILBM FORMs, but also nested
  47. ILBM, FTXT, FORMs, CATs, LISTs and PROPs!  It will always try to find the screen
  48. type that fits the best, and won't give up if you want to see 1$\times$1 brushes
  49. or {\it very\/} large pictures:  Tom tried up to 5120$\times$4096 (thanx Tom).
  50. In any case, you can force the screen type with several options.
  51.  
  52. One of the major features in this release is direct support for SHAM and
  53. indirect support for Dynamic HAM and Dynamic Hi-Res.  Note that you get {\it
  54. full\/} SHAM support --- you can scroll around SHAM pictures in little screens!
  55. Of course vertical movement requires a {\it lot\/} of work for your Amiga.  For
  56. Dynamic Hi-Res and Dynamic HAM \Mostra\ will call NewTek's Dyna-Show, that must
  57. be in one of your search paths (the simplest way to accomplish this is putting
  58. Dyna-Show in your C:  directory).  You can this way look to every kind of
  59. picture, but with Dynamic modes you lose some of \Mostra's powerful features,
  60. e.g., the screen sizing.  However, all principal functions are implemented.
  61. Including Dyna-Show-like code in \Mostra\ would have increased its size too
  62. much.  Maybe the next release I'll think about it.
  63.  
  64.  
  65. To get the syntax in AmigaDOS/ARP style type:
  66.  
  67. {\obeylines
  68. \parindent=0pt
  69. \twelvett
  70. M ?
  71. \vskip 10pt
  72. \twelverm
  73. This will produce the input template:
  74. \vskip 10pt
  75. \twelvett
  76. {\parskip=0pt Files/$\ldots$,A=ALL/s,R=REPEAT/s,Q=QUIET/s,NOFASTDRAW/s,
  77. C=CENTER/s,B=BLACKBACKGROUND/s,W=Width/k,H=Height/k,CYCLE/s,
  78. Secs/k,Fade/k,NO=NOSTARTUP/s,Batch/k,
  79. N=NOMOUSE/s,F=FREEMOUSE/s,NA=NOACTIVATE/s,DB=DOUBLEBUFFERING/s,
  80. HIRES/s,LACE/s,LORES/s,NOLACE/s,HAM/s,HALFBRITE/s:}
  81. \vskip 10pt
  82. \twelverm
  83. If you ask for more help by typing `?' again, you will see:
  84. \vskip 10pt
  85. \twelvett
  86. {\parskip=0pt \Mostra\ 1.0 {\copyright} 1990 Sebastiano Vigna
  87. Usage: M <wildcards [$\ldots$] | !> [ALL] [REPEAT] [QUIET] [NOFASTDRAW]
  88.         [CENTER] [BLACKBACKGROUND] [WIDTH n] [HEIGHT n] [CYCLE]
  89.         [SECS time] [FADE speed] [NOSTARTUP] [BATCH file]
  90.         [NOMOUSE] [FREEMOUSE] [NOACTIVATE] [DOUBLEBUFFERING]
  91.         [HIRES | LORES] [LACE | NOLACE] [HAM | HALFBRITE]}
  92. \vskip 10pt
  93. \twelverm
  94. The same help is displayed if you call \Mostra\ with no arguments.
  95. }
  96.  
  97. \Mostra's first argument is a list of patterns (or file names) as long as you
  98. want; you will get every picture whose name matches one of the patterns.
  99. Alternatively, you can type only the `!' character, and \Mostra\ will display
  100. the famous Heath File Requester, allowing you to scan the entire file system.
  101.  
  102. When you're tired of looking at the picture, move the mouse pointer to the very
  103. top of the screen and press the right button (you can also press the {\twelvett
  104. RETURN}, {\twelvett SPACE} or {\twelvett ESCAPE} keys).  You can drag or depth-
  105. arrange the screen with the left mouse button (the gadgets are invisible, but
  106. they really are there!).  {\twelvett TAB} will toggle on/off color cycling.  To
  107. stop pattern matching or IFF scanning use {\twelvett CTRL-C} at any moment.
  108.  
  109. If the screen size is less than the size of the picture, you can move around
  110. with cursor keys by themselves (moving by 8 pixels) or in combination with the
  111. {\twelvett ALT} (16 pixels, lowest=weakest), {\twelvett SHIFT} (64 pixels), or
  112. {\twelvett CTRL} (128 pixels, highest=strongest) keys.  A noteworthy feature of
  113. \Mostra\ is that the picture is {\it not\/} decrunched all at one time in a very
  114. large chunk of memory; instead, a fast LM routine decrunches the file in
  115. real-time every time you move (the routine could be faster, but it has lots of
  116. controls to get rid of damaged IFF BODY chunks; safety always first).  This is
  117. not as fast as the memory-eating method, but I think it's {\it much\/} better!
  118. Very large pictures (like 800$\times$900) will be shown in a full screen
  119. (generated on the fly at Workbench size) which you can move around.  Overscan
  120. pictures will retain their size of it's not greater than 400$\times$300 lo-res
  121. pixels (400$\times$250 on a NTSC Amiga).  For hi-res pictures, there is also a
  122. 704 pixel width limit due to Intuition.  Small brushes will be shown in a
  123. minimum 256$\times$128 pixel screen.  Of course, moving vertically with SHAM
  124. pictures involves a high system overhead, since CopperLists are continuously
  125. built and deleted.
  126.  
  127. A weird effect of this method is that you can see pictures that can't even be
  128. {\it loaded\/} into your Amiga.  Let's suppose you have a really crunched
  129. picture; the BODY chunk and a 256$\times$256 lo-res screen could take much less
  130. space than the decrunched picture, so you could create pictures that only
  131. \Mostra\ could let you see in all of their parts.  Why you would want to do
  132. this, well, that's another matter.
  133.  
  134. If you're looking at a Dynamic HAM/Dynamic Hi-Res picture, remember that you're
  135. dealing with Dyna-Show, and not with \Mostra.  To exit you must simply press a
  136. key or a mouse button.  Remember also that all other task are frozen.
  137.  
  138. Then we have a lot of options (parentheses show how to shorten 'em):
  139.  
  140. \item{$\bullet$}{\twelvett ALL (A)} recursively scans all of the subdirectories
  141. during the wildcard search.
  142.  
  143. \item{$\bullet$}{\twelvett REPEAT (R)} will endlessly restart from the first
  144. pattern when it has finished with the last; if you used the `!' line arguments,
  145. the file requester will pop up after every picture until you {\twelvett CANCEL}
  146. or close.
  147.  
  148. \item{$\bullet$}{\twelvett QUIET (Q)} turns off all messages except in case of
  149. error.
  150.  
  151. \item{$\bullet$}{\twelvett NOFASTDRAW} leaves the program at priority 0; by
  152. default, \Mostra\ will surround the BODY decrunching operations with a
  153. SetTaskPri(1).  This will not lock the system, but in a multitasking situation
  154. \Mostra\ will perform quickly when needed.
  155.  
  156. \item{$\bullet$}{\twelvett CENTER (C)} will force the screen to be centered
  157. (640$\times$200 pictures on PAL screens look so ugly$\ldots$) and will use
  158. overscan if necessary.
  159.  
  160. \item{$\bullet$}{\twelvett BLACKBACKGROUND (B)} will create a 0-bitplane (almost
  161. no memory consumed!) black screen that will stay until you saw the last picture.
  162. This is for aesthetic purposes only.
  163.  
  164. \item{$\bullet$}{\twelvett WIDTH} and {\twelvett HEIGHT (W,H)} want an argument
  165. that specifies the dimensions of the viewing screen.  However, \Mostra\ is an
  166. intelligent program, and will almost always find the correct screen by itself.
  167. WARNING:  dimensions allowed are from 64 to 1024, at your own risk.  Your Amiga
  168. won't crash, but weird things can happen$\ldots$ (Please note that SHAM vertical
  169. sizes will be rounded to the next even number).
  170.  
  171. \item{$\bullet$}{\twelvett CYCLE} will automatically activate color cycling on
  172. every picture.  Usually this happens only by request, through {\twelvett TAB}.
  173.  
  174. \item{$\bullet$}{\twelvett SECS} must be followed by a number between 0 and 1000
  175. (the zero delay was a request from a BIXen).  \Mostra\ will display the picture
  176. for the number of seconds specified, but you can skip it with mouse, {\twelvett
  177. RETURN}, {\twelvett SPACE}, and {\twelvett ESCAPE} keys as always or stop the
  178. show with {\twelvett CTRL-C}.  Cursor keys are disabled.  Greatly reworked on
  179. Warren's request.
  180.  
  181. \item{$\bullet$}{\twelvett FADE} lets you specify a speed for pictures to fade
  182. in and out.  Valid numbers are 1 to 4, with four the slowest.  Note that HAM
  183. pictures can't be faded.
  184.  
  185. \item{$\bullet$}{\twelvett NOMOUSE (N)} will hide the mouse pointer while
  186. \Mostra\ is displaying a picture.
  187.  
  188. \item{$\bullet$}{\twelvett FREEMOUSE (F)} will let you pass from one picture to
  189. another by clicking either of the mouse buttons at any position on the screen.
  190.  
  191. \item{$\bullet$}{\twelvett NOACTIVATE (NA)} will inhibit the activation of the
  192. picture screens, so you can keep on typing on your current screen.  This was a
  193. request from Tom.
  194.  
  195. \item{$\bullet$}{\twelvett DOUBLEBUFFERING (DB)} sets a double buffering show
  196. mode:  while a new picture is being loaded you see the old one, no Workbench
  197. pop-up or black screens.  Eats lots of memory, too.  Again, a request from Tom.
  198. (Note:  it's canceled if you call the file requester; if a picture requiring
  199. Dyna-Show is encountered, the current screen will be closed, in order to get as
  200. much free memory as possible:  you may consider using also {\twelvett
  201. BLACKBACKGROUND} to prevent Workbench appereance.)
  202.  
  203. Centering is no longer performed via Preferences, so if you move the screen the
  204. centering will go away.  {\twelvett NOSTARTUP} and {\twelvett BATCH} options
  205. will be discussed later.
  206.  
  207. Now, the graphics options.  You can force all screens to be {\twelvett HIRES} or
  208. {\twelvett LORES}, {\twelvett LACE} or {\twelvett NOLACE}, {\twelvett HAM} or
  209. {\twelvett HALFBRITE}.  Note that if \Mostra\ finds a six bitplane picture with
  210. no indications (no CAMG chunk), it won't set the {\twelvett HAM} flag by
  211. default.  These flags are ``dumb,'' that is, they'll do exactly what you say,
  212. even if it is meaningless.  However, if you use both {\twelvett HALFBRITE} and
  213. {\twelvett HAM} together, only the former will take place.
  214.  
  215. Note that all of the options after {\twelvett QUIET} won't have any effect on
  216. pictures shown through Dyna-Show, except for {\twelvett BLACKBACKGROUND} and
  217. {\twelvett SECS}.
  218.  
  219. And now, some examples:
  220.  
  221. \twelvett
  222. M MyPics:* SECS 5 FADE 1 NOMOUSE BLACKBACKGROUND REPEAT CENTER ALL
  223.  
  224. \twelverm
  225.  
  226. \noindent will generate a real (and endless!) slide show of the pictures in the
  227. MyPics:  dir and in all its subdirs, centered and with no mouse pointer hanging
  228. around.  In order to stop the slide show, you must press {\twelvett CTRL-C}.
  229.  
  230. \twelvett
  231. M df0:*.image df0:pictures/*.pic HIRES LACE
  232.  
  233. \twelverm
  234. \noindent will show the files ending with .image on the drive df0:  and the
  235. files ending with .pic in the directory df0:pictures.  \Mostra\ will be forced
  236. to use high resolution, interlaced screens.  Setting the {\twelvett HIRES} flag
  237. on pictures with more than 4 bitplanes usually leads you to see absolutely
  238. nothing.
  239.  
  240. \twelvett
  241. M dh0:hirespic LORES NOLACE
  242.  
  243. \twelverm
  244. \noindent will show a hi-res picture in lo-res (`zooming in').  You can move
  245. around with the cursor keys as described above.
  246.  
  247. {\twelvett WIDTH} and {\twelvett HEIGHT} can be useful when you have a picture
  248. that cannot be displayed because there's not enough Chip RAM (you get the
  249. ``Can't open Screen'' error message).  In such a case, try:
  250.  
  251. \twelvett
  252. M pic WIDTH 128 HEIGHT 128
  253.  
  254. \twelverm
  255. \noindent This will usually allow you to at least get a peek at something.
  256.  
  257.  
  258. \vskip 2cm
  259. \centerline{\big Advanced features}
  260. \vskip 1cm
  261.  
  262.  
  263. \noindent For maximum flexibility, \Mostra\ allows you to use ``startup'' files
  264. and ``startup'' Tool Types, with which you can configure the program to suit your
  265. tastes.
  266.  
  267. There is a standard startup file, called `S:Startup-Mostra'.  \Mostra\ will
  268. search for it when run from CLI.  The format of this file is {\it exactly\/} the
  269. same as the \Mostra\ line format minus the command name ({\twelvett M}).
  270. Commands may be spread out over several lines or gathered together onto a single
  271. line.  Every switch or keyword in the startup file will act as a default, and
  272. will be toggled or superseded by any command line arguments.  Command line
  273. switches will act as toggles (if your startup file has the keyword {\twelvett
  274. ALL} and you say {\twelvett M * ALL}, you {\it won't\/} go into subdirectories),
  275. while keywords simply assert the new value (if you have {\twelvett FADE 1} in
  276. your startup file and you say {\twelvett FADE 3} in the command line, your
  277. pictures will be faded at speed 3).
  278.  
  279. Two options concern startup files:
  280.  
  281. \item{$\bullet$}{\twelvett NOSTARTUP} inhibit the search for startup files,
  282. useful if you have one of them and you want to specify your options from
  283. scratch; it can be shortened with {\twelvett NO}.
  284.  
  285. \item{$\bullet$}{\twelvett BATCH} wants a complete path/filename that \Mostra\
  286. will use as startup file.
  287.  
  288. From the WB side, you can write the startup options in the Tool Types of the
  289. \Mostra\ icon, and it will use them.  The format is the same of
  290. `Startup-Mostra'.  Please note that {\twelvett FADE=1}, {\twelvett WIDTH=352}
  291. are valid, but {\twelvett FREEMOUSE=ON} is not; use only {\twelvett FREEMOUSE}.
  292.  
  293. Or you can set the first Tool Type of a project icon to {\twelvett STARTUP} and
  294. put your options in the following lines; the project picture file will be shown
  295. with those options when you double-click its icon.  You can do the same thing
  296. with an icon that has no related file, and put some wildcards in the Tool Type.
  297. The wildcards will then be shown with those options.  If you don't put in
  298. wildcards, you get a ``style'' icon:  you can {\twelvett SHIFT} click some
  299. icons, {\twelvett SHIFT} click the ``style'' icon (in {\it this\/} order) and
  300. then {\twelvett SHIFT} double-click the \Mostra\ icon (or directly {\twelvett
  301. SHIFT} double-click the last icon, if its default tool is \Mostra):  you will
  302. see the selected picture files with the options specified in the style icon.
  303. The style icon by itself will pop up the file requester.  Please note that even
  304. an icon with wildcards can be used as a style icon because multiple selections
  305. supersede wildcards.
  306.  
  307. I know, it seems a little twisted, but using it you'll find, instead, that it's
  308. the way you'd think.
  309.  
  310. {\bf WARNING}:  strange interactions can take place.  If you have some picture
  311. icons, and you {\twelvett SHIFT} click all but one of them and then you
  312. {\twelvett SHIFT} double click the last {\it and\/} the last picture icon you
  313. clicked had some {\twelvett STARTUP} options, you will see {\it all\/} of the
  314. pictures with those options.  Right?
  315.  
  316. For curious/tech/interested people, here is the exact algorithm:
  317.  
  318. \item{1.} If sm\_NumArgs$>$1 (the user started \Mostra\ with al least an icon
  319. argument), check if sm\_ArgList[1] (the first `real' argument) has Tool Types
  320. with first Tool Type = {\twelvett STARTUP}.  If so, scan the whole Tool Types list
  321. like a command line, accepting mixed commands on a single Tool Type as well as
  322. separated commands in separated Tool Types.
  323.  
  324. \item{2.} If 1.\ goes wrong, check the \Mostra\ icon Tool Types, and take them as
  325. a command line.  (Note:  {\twelvett STARTUP} is not requested.)
  326.  
  327. \item{3.} Now, if sm\_NumArgs$>$1, check every sc\_ArgList[i] with i$>$0 and if
  328. there is a related file ({\it not\/} a .info file!) generate a list of arguments
  329. as if the user entered them manually, {\it superseding\/} eventual
  330. filenames/wildcards found in 1.\ and 2.
  331.  
  332.  
  333. \noindent Now, examples, by means of common problems:
  334.  
  335.  
  336. \item{1.} ``I have a hundred pictures on my 360M hard disk, and I've organized
  337. them in a few groups.  How can I make simple slideshows, with each group
  338. separate?''
  339.  
  340. Simple:  Create a project icon for each group, and add a Tool Type {\twelvett
  341. STARTUP}.  Then add a Tool Type like {\twelvett PICS:Group1/* ALL SECS 5 CENTER}
  342. to choose your options, set the default tool to {\twelvett C:M} (or wherever you
  343. put it) and double-click (of course, this must be done with every group icon).
  344. Don't give the icons the same name as a directory, or \Mostra\ will collapse in
  345. confusion.
  346.  
  347.  
  348. \item{2.} ``I want to always see the black screen when I start from WB.''
  349.  
  350. Set a \Mostra\ Tool Type to {\twelvett BLACKBACKGROUND}.
  351.  
  352.  
  353. \item{3.} ``I have some pictures.  Sometimes I want to see a few of them with a
  354. full screen and no mouse, sometimes with a 128$\times$128 screen, sometimes
  355. centered.''
  356.  
  357. Create three ``style'' icons.  Each icon must have as its first Tool Type
  358. {\twelvett STARTUP}, and the following ones must be something like {\twelvett
  359. NOMOUSE}, {\twelvett WIDTH 128 HEIGHT 128} and {\twelvett CENTER}.  The default
  360. tool must be {\twelvett C:M}.  When you want to see in a certain style,
  361. {\twelvett SHIFT} click the picture icons and {\it then\/} {\twelvett SHIFT}
  362. double-click the style icon you desire.
  363.  
  364.  
  365. \item{4.} ``I like to click my pics one at a time, each one with different
  366. options.  I'd like also to see them in irregular groups, each picture with its
  367. options.''
  368.  
  369. You need a psycho-analyst, not \Mostra.
  370.  
  371.  
  372. \vskip 2cm
  373. \centerline{\big Credits}
  374. \vskip 1cm
  375.  
  376. I am proud to announce that \Mostra\ worked perfectly with .LBM files from an
  377. MS-DOS game, loaded directly from the original disk (via CrossDos, of course).
  378.  
  379. I wish to thank some people, first of all the ARP team for the arp.library and
  380. John Toebes at Lattice for the best Amiga C.  Speed and compactness of \Mostra\
  381. come from the fabulous 5.04 release.  Dulcis in fundo (I like {\it so\/} much
  382. the Latin!) thanks to Luca Spada (the SkyLink SysOp) for his enthusiasm about my
  383. previous Show program; he persuaded me to create \Mostra\ 1.0.
  384.  
  385. Also I would thank all of the BIXens that encouraged me someway or helped me to
  386. find bugs.  Great help with SHAM came from Warren Block and Jamie Purdon
  387. (something still has to be fixed$\ldots$).  The new centering code comes from an
  388. example by Willy Langeveld.  Erik Quackenbush made me aware of a big bug.  Dan
  389. Ten Ton suggested the new name (don't wonder, he knows the Italian!) but the
  390. pointer came also from Dave Quick (only, he doesn't know the Italian$\ldots$).
  391. Wes Howe pushed me to improve the diagnostics.  Tom Rokicki, Roger Uzun, Dan,
  392. Warren and Luca helped me to beta-test and they suggested new options.  Warren
  393. also checked the docs.  Keith Hopkins gave me the icon.  Finally, Tom sent me
  394. the greatest compliments {\twelvett 8-)}.  Etc.\ etc., I surely missed
  395. someone$\ldots$ it's the {\it best\/} programming environment in the world!
  396.  
  397. If you find any bugs please write me or leave me a message at BIX.
  398.  
  399. This software is not public domain.  It is shareware:  you should send me \$20
  400. (or more, why not?) if you find it useful (BIXfriends are of course free).
  401. Please don't send checks drawn on a US bank, they're almost impossible to cash.
  402. I'd prefer postal money orders, currency or checks drawn on an italian bank.
  403.  
  404. If you're reading this, you probably have access to a \TeX\ system.  Anyway, if
  405. you spent a good part of your time preparing and printing documents, I'd suggest
  406. you to take a look at Amiga\TeX, a wonderful package from Radical Eye Software.
  407.  
  408. This software is provided ``AS IS'' without warranty of any kind, either
  409. expressed or implied.  By using \Mostra, you agree to accept the entire risk as
  410. to the quality and performance of the program.  Any liability will be limited
  411. exclusively to product replacement.  \Mostra\ is freely distributable as long as
  412. all of its files are included in their original form without additions,
  413. deletions, or modifications of any kind.  (I {\it hate\/} all of this legal
  414. stuff, but one never knows$\ldots$)
  415.  
  416. Dyna-Show {\copyright} 1990 NewTek is a show program that features Dynamic modes display.
  417.  
  418. I hope \Mostra\ will help you to enjoy your Amiga even more (if possible).
  419.  
  420. \vskip 3cm
  421. {\obeylines\parskip=0pt
  422. Sebastiano Vigna
  423. BIX: svigna
  424. Via Valparaiso, 18
  425. 20144 MILANO Italia
  426. }
  427. \bye
  428.